#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>

#define LED_DEV "/dev/c2display"
#define PERIOD 2

typedef unsigned char u8;

int main()
{
	int fd, rc, i;
	u8 outbuf[1];
	fd = open(LED_DEV, O_RDWR);
	*outbuf = 0;
	write(fd, outbuf, 1);
	for (i=0; i<50; i++) {
		*outbuf = 0x55;
		write(fd, outbuf, 1);
		sleep(PERIOD);
		*outbuf = 0xaa;
		write(fd, outbuf, 1);
		sleep(PERIOD);
		*outbuf = 0x0;
		write(fd, outbuf, 1);
		sleep(PERIOD);
	}
}
